package com.ywk.zzh.mongotest.document;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.time.LocalDateTime;

@Data
@Document(collection = "users")
public class User {

    @Id
    private Long id;

    @Field("name")
    private String name;

    @Field("age")
    private Integer age;

    @Field("email")
    private String email;

    @Field("del_flag")
    private Integer delFlag;

    @Field("create_time")
    private LocalDateTime createTime;

    @Field("update_time")
    private LocalDateTime updateTime;
}
